const express = require("express");
const models = require("../models/db");
const router = express.Router();

router.post('/hero', (req, res) => {
	models.find({}).sort({ update_at: -1 }).then(heros => {
		console.log(heros);
		res.json(heros);
	}).catch((err) => {
		console.log(err);
		res.json(err)
	})
})

module.exports = router;
